package com.example.dynamic.client;

import com.example.dynamic.jdk.JdkProxy;
import com.example.service.UserService;
import com.example.service.impl.UserServiceImpl;

public class JdkProxyClient {
    public static void main(String[] args) {
        UserService service = (UserService) new JdkProxy().getProxy(new UserServiceImpl());
        service.addOne();
        service.deleteOne();
        System.out.println("service对象的类型: " + service.getClass());
        System.out.println("service对象的父类类型: " + service.getClass().getSuperclass());
    }
}
